package com.silence.Others;

import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class IntegerAndint {
    public static void main(String[] args) {
//        Integer a = null;
//        int b = null;
//        System.out.println(a);
//        System.out.println(b);

        List<Boy> lists = new ArrayList<>();
        for (int i = 1; i < 10; i++) {
            lists.add(new Boy(i,i+10));
        }

        List<Integer> integerStream = lists.stream().map(Boy::getName).collect(Collectors.toList());
//        System.out.println(integerStream);

        System.out.println(System.currentTimeMillis());
        System.out.println(LocalDateTime.now());

        Set<Integer> collection = new LinkedHashSet<>();
        collection.add(3);
        collection.add(1);
        collection.add(5);
        collection.add(-100);
        System.out.println(collection);

        Set<Integer> newCollection = collection.stream().sorted((o1,o2)->o1.compareTo(o2)).collect(Collectors.toCollection(LinkedHashSet::new));
        System.out.println(newCollection);
    }
}
